﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfForumList.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfForumList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客推荐列表</title>
    <link href="/jqPlugin/SelectSimu/css/base.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/pagination.css" rel="stylesheet" />
    <style>
        .viewPC {
        }

        .forum_table {
            border-spacing: 0;
            margin: 24px 0px 0px 0px;
            padding: 0;
            width: 1200px;
            border-top: 1px solid #e4e4e4;
        }

            .forum_table td {
                padding: 15px 0px;
                border-bottom: 1px solid #e4e4e4;
            }

            .forum_table .djackImg {
                width: 160px;
                text-align: center;
            }

                .forum_table .djackImg img {
                    width: 80px;
                    height: 80px;
                    margin: auto;
                    display: block;
                    border-radius: 50% !important;
                    -moz-border-radius: 50% !important;
                    -webkit-border-radius: 50% !important;
                }

                .forum_table .djackImg span {
                    font-family: 微软雅黑;
                    font-size: 14px;
                    line-height: 40px;
                    color: #333;
                }

            .forum_table .forumName {
                text-align: left;
                font-size: 18px;
                font-family: 微软雅黑;
                color: #444;
                padding-left: 40px;
            }

                .forum_table .forumName a {
                    color: #444;
                }

            .forum_table .forumTime {
                width: 180px;
                text-align: right;
                padding-right: 20px;
                font-family: 微软雅黑;
                font-size: 14px;
                color: #999;
            }

        .condition {
            margin: 25px 0px;
            text-align: left;
            display: table;
        }

            .condition .condition_titel {
                float: left;
                color: #333333;
                font-size: 16px;
                font-family: 微软雅黑;
                width: 40px;
                height: 26px;
                line-height: 26px;
            }

            .condition .condition_city {
                float: left;
                width: 82px;
                margin-left: 10px;
                height: 26px;
                line-height: 26px;
            }

        .searchResults {
            text-align: left;
            padding-left: 12px;
            color: #999;
            font-family: 微软雅黑;
            font-size: 16px;
            margin: 20px 0px;
        }

            .searchResults .s_condition {
                color: #0783d5;
            }

            .searchResults .s_number {
                color: #cc0000;
            }

        #divPage a, #divPage span {
            color: #333;
        }
    </style>
</head>
<body>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
    <div class="viewPC">
        <input type="hidden" id="countryId" value="" />
        <input type="hidden" id="cityId" value="" />
        <input type="hidden" id="destionId" value="" />
        <input type="hidden" id="pageIndex" value="1" />
        <input type="hidden" id="key" value="" />
        <div class="searchResults">搜索 <span class="s_condition" id="s_condition">马尔代夫</span> 共 <span class="s_number" id="s_number">0</span> 条商品信息</div>
        <div class="condition">
            <div class="condition_titel">地区</div>
            <div class="condition_city" id="countryId_select"></div>
            <div class="condition_city" id="cityId_select"></div>
            <div class="condition_city" id="destionId_select"></div>
        </div>
        <table class="forum_table" id="forumInfo">
        </table>

        <div class="jpage" id="divPage"></div>

        <xmp id="svc_list_temp" style="display: none">
                        {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                            <tr>
                                <td class='djackImg'>
                                    <a target='_blank' href='/wp_DjackVehicle.htm?djackId={{d.rows[i].POSTS_PUBLISH_BY}}'>
                                        <img src='{{d.rows[i].CUSTOMER_DEFAULT_PIC}} 67x60img.jpg' title="{{d.rows[i].CUSTOMER_NICK}}" />
                                        <span>{{d.rows[i].CUSTOMER_NICK}}</span>
                                    </a>
                                </td>
                                <td class='forumName'><a target='_blank' href='/wp_ForumInfo.htm?forumId={{d.rows[i].SOURCE_POSTS_ID}}'>{{d.rows[i].SOURCE_POSTS_TITLE}}</a></td>
                                <td class='forumTime'>{{d.rows[i].POSTS_PUBLISH_TIME}}</td></tr>
                        {{#} }}
             </xmp>
    </div>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
</body>
<!--start JS引用-->
<script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
<script src="/jqPlugin/js/jBase.js"></script>
<script src="/jqPlugin/js/jBPage.js"></script>
<script src="/jqPlugin/js/laytpl.js"></script>
<script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
<script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
<script src="/themes/wStyle1/js/comm/jsPagination.js"></script>
<script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
<script src="/themes/wStyle1/js/comm/DateInfo.js"></script>
<!--end JS引用-->
<script type="text/javascript">
    var pageSize = 10;
    setArea("countryId_select", 82, 1, 1, [""], ["全部"]);
    setArea("cityId_select", 82, 2, 2, [""], ["全部"]);
    setArea("destionId_select", 82, 3, 1, [""], ["全部"]);
    (function () {
        $("#key").val(GetQueryStr("key"));
        $("#s_condition").text(GetQueryStr("key"));
        $("#countryId").val(GetQueryStr("countryId"));
        $("#cityId").val(GetQueryStr("cityId"));
        $("#destionId").val(GetQueryStr("destionId"));
        var pIndex = 1;
        if (!IsNull(GetQueryStr("pIndex")) || isNaN(GetQueryStr("pIndex"))) {
            pIndex = GetQueryStr("pIndex");
        }
        $("#pageIndex").val(pIndex);
        if (IsNull(GetQueryStr("key")) == false) {
            $(".txtPrompt").hide();
        }
        checkCity();
        btnDo("init");
    })()

    function checkCity() {
        $('#countryId_select .selectList li').live('click', function () {
            var countryId = this.getAttribute('data-value');
            var cityId = "";
            var destionId = "";
            var key = $.trim($("#key").val());
            window.location.href = "/wp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + 1 + "&key=" + encodeURIComponent(key);
        });
        $('#cityId_select .selectList li').live('click', function () {
            var countryId = $('#countryId_select input').val();
            var cityId = this.getAttribute('data-value');
            var destionId = "";
            var key = $.trim($("#key").val());
            window.location.href = "/wp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + 1 + "&key=" + encodeURIComponent(key);
        });
        $('#destionId_select .selectList li').live('click', function () {
            var countryId = $('#countryId_select input').val();
            var cityId = $('#cityId_select input').val();
            var destionId = this.getAttribute('data-value');
            var key = $.trim($("#key").val());
            window.location.href = "/wp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + 1 + "&key=" + encodeURIComponent(key);
        });
    }

    function setArea(input, width, zIndex, listNum, listValue, listOption) {
        $("#" + input).SelectSimu({
            width: width,
            zIndex: zIndex,
            listNum: listNum,
            listValue: listValue,
            listOption: listOption,
            imgSrc: '/jqPlugin/SelectSimu/img/icon_down.png'
        })
    }

    function updateSelet(inputId, data, selectId) {
        var selectValue = $("#" + inputId + " .selectList ul");
        selectValue.html("");
        var isSelect = false;
        for (var i = 0; i < data.rows.length; i++) {
            if (selectId == data.rows[i].COUNTRY_CITY_ID) {
                $("#" + inputId + " input").val(data.rows[i].COUNTRY_CITY_ID);
                $("#" + inputId + " span").text(data.rows[i].COUNTRY_CITY_NME);
                isSelect = true;
            }
            selectValue.append('<li data-value="' + data.rows[i].COUNTRY_CITY_ID + '">' + data.rows[i].COUNTRY_CITY_NME + '</li>');
        }
        if (isSelect == false && data.rows.length > 0) {
            $("#" + inputId + " input").val(data.rows[0].COUNTRY_CITY_ID);
            $("#" + inputId + " span").text(data.rows[0].COUNTRY_CITY_NME);
        }
    }
    function btnDo(sEbtn) {
        GtGrid1Action = sEbtn;
        var opart = GetGtParam();
        opart = addNoAreStatistics(opart, "旅游推荐", "w0014");
        ajaxComm(opart);
    };

    //执行AJAX调用时获取参数
    function GetGtParam() {
        var _jsParam = new jsonRow();
        _jsParam.AddCell("pIndex", $("#pageIndex").val());
        _jsParam.AddCell("pRows", pageSize);
        _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
        _jsParam.AddCell("destionId", $("#destionId").val());
        _jsParam.AddCell("cityId", $("#cityId").val());
        _jsParam.AddCell("countryId", $("#countryId").val());
        _jsParam.AddCell("postsKey", $.trim($("#key").val()));
        _jsParam.AddCell("ACTION", GtGrid1Action);
        return _jsParam;
    };
    

    function goPage(pIndex) {
        var countryId = $("#countryId").val();
        var cityId = $("#cityId").val();
        var destionId = $("#destionId").val();
        var key = $.trim($("#key").val());
        window.location.href = "/wp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + pIndex + "&key=" + encodeURIComponent(key);
    }
</script>
</html>
